package com.example.publishDemo.Service;

import com.example.publishDemo.Model.Article;
import com.example.publishDemo.Model.ArticleReport;
import com.example.publishDemo.Model.ArticleScore;
import com.example.publishDemo.Model.ArticleStar;
import org.springframework.stereotype.Service;

import java.util.List;


public interface ArticleService {
    int save(Article article);

//    List<Article> rangeForTime2(int start, int end);

    List<Article> forCommend();

    int increaseView(int flag);

    int averageScore(double flag,int a_id);

    int saveScore(int u_id, int a_id, double flag);

    List<ArticleScore> isScore(int u_id, int a_id);

    Article getOne(int a_id);

    int star(int u_id, int a_id);

    int delStar(int u_id, int a_id);

    boolean isStar(int u_id, int a_id);

    int staredNum(int a_id);

    int report(int a_id, int u_id);

    ArticleReport isReport(int a_id, int u_id);

    List<Article> articleRange(int start, int end, String activeName, String keyword, int u_id);

    int countAllArticle();

    int articleRangeNum(String activeName, String keyword, int u_id);

    int allViewsForId(int u_id);

    int maxView(int u_id);

    List<Article> getAllArticleForId(int u_id);

    int change(Article article);

    List<Integer> GetAllCollectArticle(int u_id);

    List<Article> getArticleForTag(String tag);

    int articleNumByTag(String tag);

    int reReport(int r_id);
}
